import { ref } from 'vue';

import { PrimaryTableCol, TableRowData } from 'tdesign-vue-next';
import { CommonAnyData } from '@/api/model/common';

import LAV1View from '../LAN1.vue';
import LAV2View from '../LAN2.vue';
import WLANView from '../WLAN.vue';
import RouteView from '../Route.vue';

export const tabList = ref([
  { label: 'LAN1', value: 'lav1' },
  { label: 'LAN2', value: 'lav2' },
  { label: 'WLAN', value: 'wlan' },
  { label: '路由', value: 'routebox' },
]);

export const componentsMap: CommonAnyData = {
  lav1: LAV1View,
  lav2: LAV2View,
  wlan: WLANView,
  routebox: RouteView,
};

export const INIT_DATA = ref([
  { label: 'DHCP', value: false, key: 'SwitchView' },
]);

export const columns: PrimaryTableCol<TableRowData>[] = [
  { colKey: 'sn', title: '设备序列号', align: 'center' },
  { colKey: 'dev_name', title: '设备名称', align: 'center' },
  { colKey: 'opt', title: '操作', fixed: 'right', align: 'center', width: 360 },
];
